
import 'package:flutter/material.dart';
import 'package:flutter_basic/modules/main/controller.dart';
import 'package:flutter_basic/modules/main/main_page.dart';

class TestFirstPage extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('楼盘页面'),
        centerTitle: true,
      ),
      body: GestureDetector(
        onTap: (){

          Navigator.of(context).pushReplacement(
              MaterialPageRoute(builder: (context){
                return MainPage.bind(MainPageController());
              })
          );

          // Navigator.of(context).pushAndRemoveUntil(
          //     MaterialPageRoute(builder: (context){
          //       return MainPage.bind(MainPageController());
          //     }), (route) => false);
        },
        child: Center(
          child: Container(
            height: 100,
            child: Text('楼盘页面'),
          ),
        ),
      ),
    );
  }

}